package com.misweb.ibase.tool;

import android.widget.ExpandableListAdapter;

import java.text.DateFormat;
import java.util.Date;

/**
 * Created by shicheng on 2015/4/21.
 */
public class DateUtil {

    public static String getDate(){

        return DateFormat.getDateInstance(DateFormat.DEFAULT).format(new Date());
    }
    public static String getDateTime(){
        return (new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss")).format(new Date());
    }

    public static String getYYMMDD(Date date){
        try{
            return DateFormat.getDateInstance(DateFormat.DEFAULT).format(date);
        }catch (Exception e){
            return "";
        }

    }
}
